/*
 * @(#)Resource.java	1.0 2000/12/14
 *
 * Copyright 2000 Thomas Barnekow. All Rights Reserved.
 *
 * This software is the proprietary information of Thomas Barnekow.
 * Use is subject to license terms.
 */

package tb.jots;

/**
 * This interface corresponds to the <code>CosTransactions::Resource</code> IDL interface.
 *
 * @author Thomas Barnekow
 * @version 1.0
 */
public interface Resource {
	public int prepare();

	public void rollback()
		throws HeuristicCommitException,
					 HeuristicMixedException,
					 HeuristicHazardException;

	public void commit()
		throws NotPreparedException,
					 HeuristicRollbackException,
					 HeuristicMixedException,
					 HeuristicHazardException;

	public void commitOnePhase()
		throws TransactionRolledBackException,
					 HeuristicHazardException;

	public void forget();
}